﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using TestHost.Tests;

namespace TestHost
{
    public partial class MainForm : Form
    {
        public MainForm()
        {
            InitializeComponent();
        }

        private void TestLaunch_Click(object sender, EventArgs e)
        {
            try
            {
                var test = (sender as Button).Tag.ToString() + "Test";
                TestBase instance = (TestBase)Activator.CreateInstance(Type.GetType("TestHost.Tests." + test));
                instance.Run();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
    }
}
